-
Notifications
You must be signed in to change notification settings - Fork 479
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rpc-compat: remove Author from BlockForRpc #8146
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pls make CI green
c54fbbf
to
9ae4408
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think author
made some sense for AuRa networks, not sure if it is needed though
Could just change the
To
And let the Json nullability remove it from output then? |
@@ -30,7 +30,6 @@ protected BlockForRpc() | |||
public BlockForRpc(Block block, bool includeFullTransactionData, ISpecProvider specProvider) | |||
{ | |||
_isAuRaBlock = block.Header.AuRaSignature is not null; | |||
Author = block.Author ?? block.Beneficiary; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change to
Author = block.Author;
Then let [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
remove it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like that better!
Changes
Author
field from BlockForRpcTypes of changes
Removes redundant field from RPC getBlockBy * response.
What types of changes does your code introduce?
Testing
Requires testing
If yes, did you write tests?